package com.liuyu.common.framework.spring.factorybean;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.stereotype.Component;

/**
 * @ClassName FactoryBeanTest
 * @Author: liuyu
 * @Date: Created in 2021/8/16 23:37
 * @Version: 1
 * @Modified By:
 */
@Component
@Slf4j
public class FactoryBeanTest implements FactoryBean<FactoryBeanInfo> {
    @Override
    public FactoryBeanInfo getObject() throws Exception {
        log.error("FactoryBean 调用");
        return new FactoryBeanInfo();
    }

    @Override
    public Class<?> getObjectType() {
        return FactoryBeanInfo.class;
    }
}
